<!DOCTYPE HTML>
<!--suppress ALL-->
<html lang="en"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
    <link rel="shortcut icon" href="/favicon.ico"/>
    <link rel="bookmark" href="favicon.ico"/>
    <title>管理后台</title>
    <link th:href="${staticPath}+'base/static/h-ui/css/H-ui.min.css'" rel="stylesheet" type="text/css"/>
    <link th:href="${staticPath}+'base/static/h-ui.admin/css/H-ui.login.css'" rel="stylesheet" type="text/css"/>
    <link th:href="${staticPath}+'base/static/global/global.css'" rel="stylesheet" type="text/css"/>
    <link th:href="${staticPath}+'base/static/h-ui.admin/css/style.css'" rel="stylesheet" type="text/css"/>
    <link th:href="${staticPath}+'base/lib/Hui-iconfont/1.0.8/iconfont.css'" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        p {
            margin: 0;
        }

        .login_bg {
            background: url("base/static/images/login/login-bg.jpg") no-repeat top center #D1732C;
            width: 100%;
            height: 1080px;
        }

        .w1200 {
            width: 1200px;
            margin: 0 auto;
        }

        .fixedCenter {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-direction: column;
            height: 100%;
        }

        h1, h2, h3, h4, h5, h6 {
            margin: 0;
            padding: 0;
        }

        .login_content_box {
            background: url("base/static/images/login/login_cnt_bg.png") no-repeat top center;
            height: 386px;
            padding: 30px 30px 0px 50px;
            display: flex;
            flex-direction: row;
        }

        .copy_right {
            font-size: 12px;
            margin: 30px 0 0 0;
            font-family: PingFang-SC-Regular;
            font-weight: 400;
            color: rgba(255, 255, 255, 1);
            line-height: 17px;
        }

        .login_content_box .cnt_left {
            width: 346px;
            padding: 30px 0 0 00px;
        }

        .login_content_box .cnt_left h5 {
            font-size: 20px;
            font-family: PingFangSC-Regular;
            font-weight: 400;
            color: rgba(255, 255, 255, 1);
            line-height: 28px;
        }

        .login_content_box .cnt_left p {
            font-size: 12px;
            font-family: PingFangSC-Regular;
            font-weight: 400;
            color: rgba(255, 255, 255, 1);
            line-height: 17px;
        }

        .login_content_box .cnt_right {
            width: 366px;
            padding-top: 45px;
            display: flex;
            align-items: center;
            justify-content: flex-start;
            flex-direction: column;
        }

        .cnt_right .title {
            height: 30px;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }

        .cnt_right .title p {
            font-size: 16px;
            font-family: PingFang-SC-Bold;
            font-weight: bold;
            margin: 0;
            color: rgba(51, 51, 51, 1);
            line-height: 22px;
        }

        .login_form_box {
            margin-top: 30px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            width: 250px;
        }

        .login_form_box .form_box {
            width: 100%;
            height: 40px;
            border-bottom: 1px solid #EEEEEE;
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: flex-start;
        }

        .login_form_box .form_box .icon_img {
            width: 15px;
            height: 17px;
        }

        .login_txt {
            height: 39px;
            border: 0;
            font-size: 12px;
            font-family: PingFang-SC-Regular;
            font-weight: 400;
            color: #333;
            line-height: 17px;
        }

        .icon_img {
            margin-right: 15px;
        }

        .img_code {
            width: 64px;
            height: 25px;
        }

        .btn_other {
            width: 45px;
            height: 38px;
            text-align: center;
            line-height: 38px;
            margin-left: 8px;
            cursor: pointer;
        }

        .form_box .check {
            margin-top: 3px;
            margin-right: 5px;
        }

        .btn_big {
            width: 253px;
            font-size: 14px;
            font-family: PingFang-SC-Bold;
            font-weight: bold;
            border: 0;
            color: rgba(255, 255, 255, 1);
            line-height: 20px;
            height: 40px;
            background: rgba(255, 136, 34, 1);
        }

        .login_form_box .form_box p {
            font-size: 12px;
            font-family: PingFang-SC-Regular;
            font-weight: 400;
            color: rgba(153, 153, 153, 1);
            line-height: 17px;
        }
    </style>
</head>
<body>
<div class="login_bg">
    <div class="w1200 fixedCenter">
        <div class="login_content_box">
            <div class="cnt_left">
                <h5>后台管理系统</h5>
                <p>H-ui.admin v3.1</p>
            </div>
            <div class="cnt_right">
                <div class="title">
                    <p>欢迎登录</p>
                    <img th:src="${staticPath}+'base/static/images/login/cnt_title.png'" alt="">
                </div>
                <div class="login_form_box">
                    <div class="form_box">
                        <img th:src="${staticPath}+'base/static/images/login/icon_user.png'" alt="" class="icon_img">
                        <input type="text" class="login_txt w-200" placeholder="账户" id="username" value="" name="username">
                    </div>
                    <div class="form_box">
                        <img th:src="${staticPath}+'base/static/images/login/icon_pwd.png'" alt="" class="icon_img">
                        <input type="password" class="login_txt w-200" placeholder="密码" value="" id="userpwd" name="userpwd">
                    </div>
                    <div class="form_box">
                        <img th:src="${staticPath}+'base/static/images/login/icon_code.png'" alt="" class="icon_img">
                        <input type="text" class="login_txt w-100" placeholder="验证码" value="" name="code" id="code">
                        <img th:src="${website}+'ajax/manage/imgcode'" alt="" class="img_code" id="imgjym">
                        <div class="btn_other" id="kanbuq" onclick="changejym()">换一张</div>
                    </div>
                    <label class="form_box">
                        <input type="checkbox" class="check" name="online" id="online">
                        <p>使我保持登录状态</p>
                    </label>
                    <input type="button" class="btn_big btn_origin mt-25" onclick="login()" value="登 录">
                </div>
            </div>
        </div>
        <p class="copy_right">Copyright &#169 2019-2029</p>
    </div>
</div>
<input type="hidden" id="domain" name="domain" th:value="${webSite}"/>
<input type="hidden" id="staticSite" name="staticSite" th:value="${staticSite}"/>
<script type="text/javascript" th:src="${staticPath}+'base/lib/jquery/1.9.1/jquery.min.js'"></script>
<script type="text/javascript" th:src="${staticPath}+'base/lib/layer/2.4/layer.js'"></script>
<script>
    $(function () {
        $('.login_bg').height($(window).height());
    })
</script>
<script type="text/javascript">
    function login() {
        var uname = $("#username").val();
        var upwd = $("#userpwd").val();
        var memo = $("#code").val();
        var online = 0;

        if ($('#online').prop("checked")) {
            online = 1;
        }

        if (uname == "" || uname.length < 4) {
            layer.msg('请输入正确的用户名称!', {icon: 2, time: 1500});
            return;
        }
        if (upwd == "" || upwd.length <= 4) {
            layer.msg('请输入正确的密码!', {icon: 2, time: 1500});
            return;
        }
        if (memo == "" || memo.length != 4) {
            layer.msg('请输入正确的校验码!', {icon: 2, time: 1500});
            return;
        }
        var domain = $("#domain").val();
        $.post(domain + "ajax/manage/login", {
            loginName: uname,
            password: upwd,
            memo: memo,
            online: online
        }, function (d) {
            if (d.code == 1) {
                window.location = $("#staticSite").val() + "main/index";
                return;
            }
            layer.msg(d.msg, {icon: 2, time: 1500});
            changejym();
        });
    }

    function changejym() {
        $("#imgjym").attr('src', $("#domain").val() + "ajax/manage/imgcode?m=" + Math.random());
    }

    $(document).keyup(function (event) {
        if (event.keyCode == 13) {
            login();
        }
    });
</script>
</body>
</html>